package com.ygj.employeeReport.service.complaint.impl;

import com.base.common.ConfigConstants;
import com.base.common.enums.TicketCategories;
import com.base.common.persistent.dao.TicketMapper;
import com.base.common.persistent.model.Ticket;
import com.ygj.employeeReport.service.base.impl.TicketBaseServiceImpl;
import com.ygj.employeeReport.service.complaint.ComplaintEmployeeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("complaintEmployeeService")
public class ComplaintEmployeeServiceImpl extends TicketBaseServiceImpl implements ComplaintEmployeeService{

	@Resource
	private TicketMapper ticketMapper;
	
	@Override
	public List<Ticket> getComplaintEmployeeTicketsByEmployeeId(int employeeId,
			int page) {
		return  ticketMapper.queryTicketsByCategoriesAndEmployeeId(getStartNum(page), Integer.parseInt(ConfigConstants.INFOS_LIST_NUM), TicketCategories.EMPLOYEECOMLAINT.getValue(), employeeId);
	}

}
